import { defHttp } from "@/utils/http";

// ERP 药品活性成分API
export const drugIngredientApi = {
	// 获得药品活性成分分页
	drugIngredientList: async (params: any) => {
		return await defHttp.get({ url: `/whs/drug-ingredient/page`, params });
	},
	// 新增药品活性成分
	drugIngredientCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/drug-ingredient/create`, data });
	},

	// 修改药品活性成分
	drugIngredientUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/drug-ingredient/update`, data });
	},

	// 删除药品活性成分
	drugIngredientDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/drug-ingredient/delete?id=` + id });
	}
};
